//
// Created by jmdvirus on 2020/1/7 上午10:35.
// Copyright (c) 2020 benewtech All rights reserved.
//
//     ******          *             *--*
//       ||            *             |
//       ||  *--*--*---*  * *-********--*
//   *  //   *  *  *   *\ / ||  |  |    |
//    **    *  *  *---* *  *   *--* *--*
//

#include "CMCommandLineParser.h"

int main(int argc, char *args[])
{
    const std::string keys = "{help h usage ? |      | print this message   }"
                             "{@image1        |      | image1 for compare   }"
                             "{@image2        |<none>| image2 for compare   }"
                             "{@repeat        |1     | number               }"
                             "{path           |.     | path to file         }"
                             "{fps            | -1.0 | fps for output video }"
                             "{N count        |100   | count of objects     }"
                             "{ts timestamp   |      | use time stamp       }";
    CommandLineParser parser(argc, args, keys);
    parser.about("Application name v1.0.0");

    if (parser.has("help"))
    {
        parser.printMessage();
        return 0;
    }

    int         N    = parser.get<int>("N");
    double      fps  = parser.get<double>("fps");
    std::string path = parser.get<std::string>("path");

    bool use_time_stamp = parser.has("timestamp");

    std::string img1 = parser.get<std::string>(0);
    std::string img2 = parser.get<std::string>(1);

    int repeat = parser.get<int>(2);

    if (!parser.check())
    {
        parser.printErrors();
        return 0;
    }
    printf("N=%d\n", N);
    return 0;
}